package com.zb.jnlxc.form;

import com.ZLHW.base.Exception.BaseErrorModel;
import com.zb.util.StringUtils;

/**
 * Created by zhengbo.zb on 2014/9/17.
 */
public class JiYaDetail {
    private String liaoKuangCode;

    private Integer paichanSize; //规定尺寸

    private Integer compTotalMeter; //总米数（米）
    private Integer compQuantity; //完成数量
    private Integer compWeight; //完成重量（千克）

    public String getLiaoKuangCode() {
        return liaoKuangCode;
    }

    public void setLiaoKuangCode(String liaoKuangCode) {
        this.liaoKuangCode = liaoKuangCode;
    }


    public Integer getCompTotalMeter() {
        return compTotalMeter;
    }

    public void setCompTotalMeter(Integer compTotalMeter) {
        this.compTotalMeter = compTotalMeter;
    }

    public Integer getCompQuantity() {
        return compQuantity;
    }

    public void setCompQuantity(Integer compQuantity) {
        this.compQuantity = compQuantity;
    }

    public Integer getCompWeight() {
        return compWeight;
    }

    public void setCompWeight(Integer compWeight) {
        this.compWeight = compWeight;
    }


    public Integer getPaichanSize() {
        return paichanSize;
    }

    public void setPaichanSize(Integer paichanSize) {
        this.paichanSize = paichanSize;
    }

    public void validate(){
        if(StringUtils.isBlank(liaoKuangCode)||
                paichanSize==0||
                compTotalMeter==null||compWeight==0||
                compQuantity==null||compQuantity==0||
                compTotalMeter==null||compTotalMeter==0||
                compWeight==null||compWeight==0)
            throw new BaseErrorModel("挤压明细内容不完整","");
    }
}
